package com.example.yunbiji0314.dao;

import com.example.yunbiji0314.pojo.TRole;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TRoleDao {

    //根据用户id，查询角色信息
    @Select("select * \n" +
            "from t_role\n" +
            "where id IN (select role_id from t_user_role where user_id=#{id})")
    List<TRole> findById(Integer id);
}
